import java.util.InputMismatchException;
import java.util.Random;
import java.util.Scanner;
public class GuessNumber {
    public static void main(String[]args) {

        Random random = new Random();
        int num = random.nextInt( 100) +1;
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.println("请输入猜测的数字：");
            int lxyGuess = scanner.nextInt();
            if (lxyGuess > num) {
                System.out.println("猜大了");
            }else if (lxyGuess < num) {
                System.out.println("猜小了");
            }else {
                System.out.println("猜对了！");
                break;
            }
        }
    }
}